<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>父子盒子-文本溢出测试</title>
    <style>
        .father {
            margin: 100 auto;
            background-color: skyblue;
            height: 100px;
            width: 150px;
            padding-top: 20px;
        }

        .son {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            background-color: #ccc;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son">
            zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy11111111111111111111
        </div>
    </div>
</body>

</html>